redis.replicate_commands()
local key = KEYS[1]
local args = ARGV[1]
redis.log(redis.LOG_WARNING, "KEYS  " ..key)
local value = redis.call("get", key);
if value == false then
    redis.call("SETEX", key, 600, args)
    redis.log(redis.LOG_WARNING, "args1  " ..args)
    return "9999"
elseif (args - value > 10) then
    redis.log(redis.LOG_WARNING, "args2  " ..args)
    return "1"
else
    redis.log(redis.LOG_WARNING, "value  " ..value)
    return "2"
end
